package com.usian.day10.redis.controller;

import org.redisson.Redisson;
import org.redisson.api.RedissonClient;
import org.redisson.config.Config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

/**
 * @author baimugudu
 * @email 2415621370@qq.com
 * @date 2023/8/7 15:12
 */
@SpringBootApplication
public class App {


    /**
     * 把RedissonClient 作为springbean 注入到容器里面
     * @return
     */
    @Bean
    public RedissonClient redissonClient(){
        RedissonClient redissonClient = Redisson.create();
        return redissonClient;
    }

    public static void main(String[] args){
        SpringApplication.run(
                App.class,
                args
        );
    }
}
